﻿using DHQGHN.DAL.DAO.DHQG;
using DHQGHN.DAL.Models.DHQG;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DHQGHN.DAL.BO.DHQG
{
    public class ShareFileBO :BaseBO
    {
        private ShareFileDAO _dao;
        public ShareFileBO()
        {
            _dao = new ShareFileDAO(Common.ConnectionUtil.DHQGHN_CONNECTION_STRING, DEFAULT_MAPPER_TYPE);
        }
        public bool Save(ShareFile data)
        {
            try
            {
                return _dao.Save(data);
            }
            catch
            {
                throw;
            }
        }
        public bool Update(ShareFile data)
        {
            try
            {
                return _dao.Update(data);
            }
            catch
            {
                throw;
            }
        }
        public List<ShareFile> GetallbyDonviID(int donvibanhanh) {
            try
            {
                return _dao.GetallbyDonviID(donvibanhanh);
            }
            catch
            {
                throw;
            }
        }
        public List<ShareFile> GetallbyDonviTruyCap(int donvitruycap)
        {
            try
            {
                return _dao.GetallbyDonviTruyCap(donvitruycap);
            }
            catch
            {
                throw;
            }
        }
        public List<ShareFile> GetallbyID(int id)
        {
            try
            {
                return _dao.GetallbyID(id);
            }
            catch
            {
                throw;
            }
        }

    }
}
